package org.hydrakyoufeng.vv.configuration;

import org.springframework.stereotype.Component;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * 缓存token，如果有redis可以替代ConcurrentHashMap方案
 */
@Component
public class TokenCache {

    private Map<String, Object> cache = new ConcurrentHashMap<>();

    public void put(String key,Object value) {
        cache.put(key,value);
    }

    public Object get(Object key) {
        return cache.get(key);
    }


}
